﻿@model IEnumerable<DSAAssignment.Models.FaultModel>

@{
    ViewBag.Title = "FaultsList";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>FaultsList</h2>
<table>
    <tr>
        <th>
            ID
        </th>
        <th>
            ProductID
        </th>
        <th>
            ProductName
        </th>
        <th>
            FaultID
        </th>
        <th>
            FaultStatus
        </th>
         <th>
            FaultDescription
        </th>
         <th>
            Date Reported
        </th>
        <th>
            UserName
        </th>

        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
      <td>
            @Html.DisplayFor(modelItem => item.UserFaultID)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ProductID)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ProductName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.FaultID)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.FaultStatus)
        </td>
         <td>
            @Html.DisplayFor(modelItem => item.FaultDescription)
        </td>
         <td>
            @Html.DisplayFor(modelItem => item.Date)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.UserName)
        </td>
        <td>
            @Html.ActionLink("Update", "UpdateFault", new { Controller = "Product" , id = item.UserFaultID }, null)
        </td>
       
    </tr>
}

</table>
